<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<c:set var="contextPath" value="${pageContext.request.contextPath}"></c:set>
<!DOCTYPE HTML>
<html>
<head>
<script type="text/javascript" src="${contextPath}/resources/easyui/jquery.min.js"></script>
<script type="text/javascript" src="${contextPath}/resources/easyui/jquery.easyui.min.js"></script>
<script type="text/javascript" src="${contextPath}/resources/easyui/locale/easyui-lang-zh_CN.js"></script>
<script type="text/javascript" src="${contextPath}/resources/easyui/handlecoo.js"></script>
<script type="text/javascript" src="${contextPath}/resources/easyui/mask.js"></script>
<script type="text/javascript" src="${contextPath}/resources/basicInfoJS/util/second_evel_address.js"></script>
<link rel="stylesheet" type="text/css" href="${contextPath}/resources/easyui/themes/bootstrap/easyui.css">
<link rel="stylesheet" type="text/css" href="${contextPath}/resources/easyui/themes/bootstrap/window.css">
<link rel="stylesheet" type="text/css" href="${contextPath}/resources/easyui/themes/icon.css">
<script type="text/javascript">
$('#magazineGrid').datagrid({
    url: '${pageContext.request.contextPath}/sys/cooperatormgt/cooperatordetail',
    method: 'POST',
    fitColumns: true,
    singleSelect: false,
    rownumbers: true,
    pagination: true,
    nowrap: false,
    checkOnSelect: true, 
	selectOnCheck: true,
    pageSize: 5,
    pageList: [5, 10, 15],
    showFooter: true,
    columns: [[
	     {
			field : 'ck',
			checkbox : true
		}, {
			field : 'cooperId',
			title : 'ID',
			align : 'right'
		}, {
			field : 'cooperName',
			title : '合作者姓名',
			width : 100,
			align : 'right'
		},{
			field : 'phone',
			title : '电话',
			width : 100,
			align : 'right'
		},{
			field : 'address',
			title : '地址',
			width : 100,
			align : 'right'
		},{
			field : 'province',
			title : '省份',
			width : 100,
			align : 'center',
			formatter:function(value,rowData,rowIndex){
				
				return  null==value|""==value?"":loadProvinceCustom(value);
			}
		},{
			field : 'city',
			title : '城市',
			width : 80,
			align : 'center',
			formatter:function(value,rowData,rowIndex){
				
				return  null==value|""==value?"":loadCityCustom(value);
			}
		},{
			field : 'email',
			title : '邮箱',
			align : 'left'
		},{
			field : 'status',
			title : '状态',
			width : 80,
			align : 'center',
			formatter:function(value,rowData,rowIndex){
				
				return  value==0?'未验证邮箱':(value==1?'验证邮箱通过':'注销');
			}
		} ] ],
		toolbar: [{
		    text: '删除',
		    iconCls: 'icon-remove',
		    handler: function () { delet($('#magazineGrid'),'${pageContext.request.contextPath}/sys/cooperatormgt/delcooperatordetail',2); }
		},'-',{
			text: '合作者详情',
		    iconCls: 'icon-remove',
		    handler: function () { getCoopeInfo($('#magazineGrid'),'${pageContext.request.contextPath}/sys/cooperatormgt/getCoopeInfo',null,null); }
		}],                                                        
		onDblClickRow:function(rowIndex, rowData){
			getCoopeInfo($('#magazineGrid'),'${pageContext.request.contextPath}/sys/cooperatormgt/getCoopeInfo',rowIndex,rowData);
		}

	});
</script>
</head>
<body>
<div id="magazineGrid"></div>

<div id = "dlg" class="easyui-dialog" title="合作者详情" style="width:400px;height:400px;padding:20px;" data-options="
            iconCls:'icon-edit',
            onResize:function(){
                $(this).dialog('center');
            },
            closed:true">
    <div style="padding:10px 10px 20px 40px">
    <form id="ff" method="post">
        <table cellpadding="5">
            <tr>
                <td>cooperId:</td>
                <td><input id ="formid"class="easyui-textbox" type="text" name="ID"  data-options="required:true"></input></td>
            </tr>
            <tr>
                <td>合作者姓名:</td>
                <td><input class="easyui-textbox" type="text" name="cooperName"  data-options="required:true"></input></td>
            </tr>
            <tr>
                <td>电话:</td>
                <td><input class="easyui-textbox" type="text" name="phone" data-options="required:true"></input></td>
            </tr>
            <tr>
                <td>邮箱:</td>
                <td><input class="easyui-textbox" name="email"  data-options="required:true,validType:'email'" ></input></td>
            </tr>
            <tr>
                <td>省份:</td>
                <td>
                    <select class="easyui-combobox" name="province" ><option value="ar">Arabic</option><option value="bg">Bulgarian</option><option value="ca">Catalan</option><option value="zh-cht">Chinese Traditional</option><option value="cs">Czech</option><option value="da">Danish</option><option value="nl">Dutch</option><option value="en" selected="selected">English</option><option value="et">Estonian</option><option value="fi">Finnish</option><option value="fr">French</option><option value="de">German</option><option value="el">Greek</option><option value="ht">Haitian Creole</option><option value="he">Hebrew</option><option value="hi">Hindi</option><option value="mww">Hmong Daw</option><option value="hu">Hungarian</option><option value="id">Indonesian</option><option value="it">Italian</option><option value="ja">Japanese</option><option value="ko">Korean</option><option value="lv">Latvian</option><option value="lt">Lithuanian</option><option value="no">Norwegian</option><option value="fa">Persian</option><option value="pl">Polish</option><option value="pt">Portuguese</option><option value="ro">Romanian</option><option value="ru">Russian</option><option value="sk">Slovak</option><option value="sl">Slovenian</option><option value="es">Spanish</option><option value="sv">Swedish</option><option value="th">Thai</option><option value="tr">Turkish</option><option value="uk">Ukrainian</option><option value="vi">Vietnamese</option></select>
                </td>
            </tr>
            <tr>
                <td>城市:</td>
                <td>
                    <select class="easyui-combobox" name="city" ><option value="ar">Arabic</option><option value="bg">Bulgarian</option><option value="ca">Catalan</option><option value="zh-cht">Chinese Traditional</option><option value="cs">Czech</option><option value="da">Danish</option><option value="nl">Dutch</option><option value="en" selected="selected">English</option><option value="et">Estonian</option><option value="fi">Finnish</option><option value="fr">French</option><option value="de">German</option><option value="el">Greek</option><option value="ht">Haitian Creole</option><option value="he">Hebrew</option><option value="hi">Hindi</option><option value="mww">Hmong Daw</option><option value="hu">Hungarian</option><option value="id">Indonesian</option><option value="it">Italian</option><option value="ja">Japanese</option><option value="ko">Korean</option><option value="lv">Latvian</option><option value="lt">Lithuanian</option><option value="no">Norwegian</option><option value="fa">Persian</option><option value="pl">Polish</option><option value="pt">Portuguese</option><option value="ro">Romanian</option><option value="ru">Russian</option><option value="sk">Slovak</option><option value="sl">Slovenian</option><option value="es">Spanish</option><option value="sv">Swedish</option><option value="th">Thai</option><option value="tr">Turkish</option><option value="uk">Ukrainian</option><option value="vi">Vietnamese</option></select>
                </td>
            </tr>
             <tr>
                <td>地址:</td>
                <td><input class="easyui-textbox" name="address"  data-options="multiline:true" style="height:60px"></input></td>
            </tr>
            <tr>
                <td>状态:</td>
                <td><input class="easyui-textbox" name="status"  ></input></td>
            </tr>
        </table>
    </form>
    <div style="text-align:center;padding:5px">
        <a href="javascript:void(0)" class="easyui-linkbutton" onclick="submitForm()">提交</a>
        <a href="javascript:void(0)" class="easyui-linkbutton" onclick="clearForm()">清除</a>
    </div>
    </div>
</div>
</body>
</html>